function MouseSetup()
{
	var temp;
	var dispgrid;

	dispgrid = sliderconv1( mouse_grid );
	DlogOpen( "俁俢僇乕僜儖堏摦検愝掕", 1 );
	DlogSlider( 0, "俁俢僇乕僜儖堏摦検", SLIDER_HABA, MAX_SLIDER_NUM1, dispgrid, gridconv1 );
	if ( DlogWait() )
	{
		dispgrid = DlogAnswer( 0 );
		mouse_grid = gridconv1( dispgrid );
		SetGrid( mesh_grid, mouse_grid );
	}
}
function ButtonDisp()
{
	if( buttondisp_flag == ON )
	{
		buttondisp_flag = OFF;
		ButtonArea( 0 );
	}
	else
	{
		buttondisp_flag = ON;
		ButtonArea( BUTTONAREA );
	}
	UpdateButton();
}

function ChangeHeimenTosha()
{
	tosha_flag = !tosha_flag;
}

function ChangeNovice()
{
	novice_flag = !novice_flag;
}

function private ChangeInputMode()
{
	if( input_button == INPUT )
	{
		input_button = CURSOR;
		cursor_button = INPUT;
	}
	else
	{
		input_button = INPUT;
		cursor_button = CURSOR;
	}
	InputMode( input_button, cursor_button );
}

function private Check_flag()
{
	var	temp;

	temp = MenuFunction();
	if( temp == ButtonDisp )
	{
		if( buttondisp_flag == ON )
			MenuEnable( MENU_CHECK );
		else
			MenuEnable( MENU_NOCHECK );
	}
	else if( temp == ChangeNovice )
	{
		if( novice_flag == ON )
			MenuEnable( MENU_CHECK );
		else
			MenuEnable( MENU_NOCHECK );
	}
	else if( temp == ChangeInputMode )
	{
		if( input_button == INPUT )
			MenuEnable( MENU_CHECK );
		else
			MenuEnable( MENU_NOCHECK );
	}
}

MenuPosition(
	Menu( " 憖嶌愝掕(&S)",
		"栋抠堏摦検愝掕...",	MouseSetup,
		"-----------------",	SEPARATE_MENU,
		"无垒昞帵         ",	ButtonDisp,Check_flag,
		"爷景嫁昞帵       ",	ChangeNovice,Check_flag,
		"-----------------",	SEPARATE_MENU,
		"帺摦暯柺搳幩     ",	ChangeHeimenTosha,Check_Toshaflag,
		"-----------------",	SEPARATE_MENU,
		"塃偱栋抠堏摦     ",	ChangeInputMode,Check_flag
	), Menu_control
);
